package com.sc.VenusQueryBeta.model.account.daikuan;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.daikuan.DaiKuan02Contract;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.daikuan.DaiKuanBean02;


import io.reactivex.Observable;

/**
 * Created by Administrator on 2018/10/19.
 */

public class DaiKuan02Model  extends BaseModel implements DaiKuan02Contract.IDaiKuan02nModel{
//    @Override
//    public Observable<DaiKuanBean02> getDaiKuan02(String serverAddress, String projectName, int serverPort, int clientindex, int start, int limit, int roomid, String clientAppmsgnum) {
//
//    }
    public  static DaiKuan02Model newInstance(){
        return new DaiKuan02Model();
    }

    @Override
    public Observable<CurrencyListBean> queryAllCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());
    }

    @Override
    public Observable<DaiKuanBean02> getDaiKuan02(String serverAddress, String projectName, int serverPort, int clientindex, int start, int limit, int roomid, String clientAppmsgnum, String currencynameCN) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                daikuan2(clientindex,start,limit,roomid,clientAppmsgnum,currencynameCN).compose(RxHelper.<DaiKuanBean02>rxSchedulerHelper());
    }
}
